package com.pacy.pacybaseproject.viewmodels;

import android.app.Application;


import com.pacy.pacybaseproject.R;
import com.pacy.pacybaseproject.adapters.HomeMenuAdapter;
import com.pacy.pacybaseproject.adapters.MyMenuAdapter;
import com.pacy.pacybaseproject.beans.MenuBean;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.annotations.NonNull;
import me.goldze.mvvmhabit.base.BaseViewModel;

/**
 * @author PACY
 * @date 2023/12/20
 * description:
 */
public class MineViewModel extends BaseViewModel {
    public MyMenuAdapter menuAdapter;
    public MineViewModel(@NonNull Application application) {
        super(application);
    }

    @Override
    protected void init() {
        super.init();
        initAdapter();
    }
    private void initAdapter(){
        menuAdapter=new MyMenuAdapter();
        List<MenuBean> datas=new ArrayList<>();
        datas.add(new MenuBean("步行", R.drawable.my_menu_buxing));
        datas.add(new MenuBean("骑行", R.drawable.my_menu_qixing));
        datas.add(new MenuBean("打车", R.drawable.my_menu_dache));
        datas.add(new MenuBean("公交", R.drawable.my_menu_gongjiao));
        datas.add(new MenuBean("轨道", R.drawable.my_menu_guidao));
        datas.add(new MenuBean("自驾", R.drawable.my_menu_zijia));
        menuAdapter.setNewInstance(datas);
    }
}
